Add Book to My BookshelfPurchase This Book Online

Chapter 2 - The Mystery of Subnetting

Cisco & IP Addressing
Louis D. Rossi, Louis R. Rossi and Thomas Rossi
  Copyright © 1999 The McGraw-Hill Companies, Inc.

Chapter 2: The Mystery of Subnetting
Objectives
  Describe the reason for subnetting.
  Describe calculation of combinations.
  Describe the process of determining what subnet should be used.
  Apply an IP addressing scheme to a fictional organization.
  Describe broadcast addresses.
Why Do We Subnet?
The IP addressing scheme was developed in the late 60s. It was never conceived at that point that so many organizations would want to access what is now called the Internet. The limited addressing space of 32 bits leaves us in a pickle for available bits.
Many people have experienced the same type of problem with voice addresses recently.
For instance, my area code changed from 904 to 850 because the phone company was running out of 904 addressing space. So in effect what the phone company created a sub-area with a different area code. Now the 850 area code is geographically inside what once was the 904 area code.
In the world of IP addressing the same idea was used as a solution to lack of addressing space. We will place one network inside another network. This is called subnetting.
Assume for a moment that an organization has been assigned a single Class B address of 132.10.0.0. We learned from Chapter 1 that the network portion of this address is 132.10.0.0. This address describes a single wire only.
This organization will most likely have hundreds of wires.
How will this company address all of its wires?
  Tip Subnetting is a solution.
Before we begin our discussion of subnetting let’s briefly discuss combinations.
Combinations
In our example of 132.10.0.0, if we look at the host bits only, there are 65,536 unique combinations. This number is calculated by using the formula 2n, where n is the total number of bits 216=65,536.
Suppose we want the number of combinations of just 4 bits, 24 yields 16 combinations.
Table 2.1  4-bit Combinations
Bit 1
Bit 2
Bit 3
Bit 4
Combo 1
0
0
0
0
Combo 2
0
0
0
1
Combo 3
0
0
1
0
Combo 4
0
0
1
1
Combo 5
0
1
0
0
Combo 6
0
1
0
1
Combo 7
0
1
1
0
Combo 8
0
1
1
1
Combo 9
1
0
0
0
Combo 10
1
0
0
1
Combo 11
1
0
1
0
Combo 12
1
0
1
1
Combo 13
1
1
0
0
Combo 14
1
1
0
1
Combo 15
1
1
1
0
Combo 16
1
1
1
1
Notice the all-zero and the all-one combinations (1, 2, 15, and 16). We will discuss these combinations later.
Table 2.2  Total Combinations
Bits
Combinations
0
1
2
2
4
3
8
4
16
5
32
6
64
7
128
8
256
9
512
10
1024
11
2048
12
4096
13
8192
14
16384
15
32768
16
65536
Combinations and Subnets
Why are we talking about combinations when we want to learn about subnets?
Subnetting is the process of taking bits from the host portion of the address and using them to describe networks. Before we can subnet we need to determine how many bits we should take from the host portion. The number of bits we take is dependent upon the total number of combinations.
For instance, suppose we needed to have at least 10 subnets; Table 2.2 indicates that if we take 4 bits from the host portion we can get 16 combinations.
Adjusting the Formula for Network Bit Combinations
If we include the combinations of all 1s and all 0s this could cause some problems with some internetworking devices.  We will adjust our formula by deducting two from the total number of combinations.
As a result, the formula for calculating the total number of network combinations is:
2N–2 where N is the number of network bits.
Adjusting the Formula for Host Bit Combinations
We will deduct 2 from our host combinations as well, but for different reasons.
  When all host bits are 0, the resulting address describes a network.
  When all host bits are 1, the resulting address describes a broadcast address.
As a result, the formula for calculating the total number of host combinations is:
2N–2 where N is the number of host bits.
Table 2.3  Total Combinations Adjusted by Subtracting 2
Bits
Combinations
0
1
0
2
2
3
6
4
14
5
30
6
62
7
126
8
254
9
510
10
1022
11
2046
12
4094
13
8190
14
16382
15
32766
16
65534
If we have 10 bits to describe networks and 6 bits to describe hosts we have address space for:
210–2 = 1022
Hosts2
6–2 = 62
Total host addressing space is: 1022 x 62 = 63,364
What determines how many combinations I need?
To answer this question we need to answer a few other questions first.
  How many unique networks or wires does my organization need?
  What is the maximum number of hosts required on any one of these unique wires?
Assume that an organization called ARI has received a Class C IP address (Figure 2.1). For the sake of this example, we will use the address of 192.16.12.0/24.
Figure 2.1  ARI Topology
The total number of network combinations needed by ARI is 7.
3 Serial wires
4 Ethernet wires
The total number of host combinations needed by ARI is 11.
The Ethernet interface of the JAX router will require an IP host address, hence 11 host addresses will be required.
There are 11 hosts in JAX; the other locations only require host addressing space for 6.
Based on the above answers, how many bits should we take from the fourth octet to describe wires or networks?
Referring to Table 2.3, we would have to have at least 4 bits to provide us with 7 combinations:
24–2=14
If we took 3 bits we would only have 6 combinations:
23–2=6
If we took 4 bits, we would have 14 unique combinations, which would provide us an additional 7 combinations. We might be able to use these additional combinations to describe future networks if ARI expands.
Before we begin implementing our address scheme, we need to make sure we have enough host addressing space. We need to provide addresses for the 11 hosts in JAX.
Again referring to Table 2.3, if we take 4 bits to describe networks, that would leave us 4 bits to describe hosts.
Keep in mind we only have 8 bits (4th octet) to manipulate.
Four host bits would provide 14 unique combinations.
This provides enough host addressing space to meet ARI’s requirements.
How many host addresses will be required for the serial links between JAX and the other three sites?
We have a serial interface on each end that we will address. Only two host addresses will be required. We will see that there is a waste of precious addressing space on these serial links. We do have solutions and will investigate those solutions in later chapters.
What Is the Value of the Mask If We Have Four Subnet Bits?
The value of the mask is the value of the 32 bits when all network bits are 1 and the hosts bits are 0.
In the case of ARI they will use a mask of 255.255.255.240 (Table 2.4).
Table 2.4  Mask of 255.255.255.240 Represented in Binary
What Addresses Will Identify the Networks of ARI?
As we begin to take a look at the available addresses, let us agree that we can put the first three octets aside. These bits cannot be changed. They are registered to ARI and every frame that goes out on the Internet must have a source address that identifies ARI. The first 24 bits of 192.16.12.0 must never be changed.
Now we can concentrate our efforts on the 4th octet.
Table 2.5  Fourth Octet Network Combinations with a 240 Mask
128
64
32
16
8
4
2
1
Network Address
Combo 1
0
0
0
0
0
0
0
0
0
Combo 2
0
0
0
1
0
0
0
0
16
Combo 3
0
0
1
0
0
0
0
0
32
Combo 4
0
0
1
1
0
0
0
0
48
Combo 5
0
1
0
0
0
0
0
0
64
Combo 6
0
1
0
1
0
0
0
0
80
Combo 7
0
1
1
0
0
0
0
0
96
Combo 8
0
1
1
1
0
0
0
0
112
Combo 9
1
0
0
0
0
0
0
0
128
Combo 10
1
0
0
1
0
0
0
0
144
Combo 11
1
0
1
0
0
0
0
0
160
Combo 12
1
0
1
1
0
0
0
0
176
Combo 13
1
1
0
0
0
0
0
0
192
Combo 14
1
1
0
1
0
0
0
0
208
Combo 15
1
1
1
0
0
0
0
0
224
Combo 16
1
1
1
1
0
0
0
0
240
Notice that the 4th octet value of the network address are all multiples of 16.
Notice also that 16 is the value of the least significant subnet bit.
Network addresses are always multiples of the least significant subnet bit.
I have highlighted the all 0 and the all 1 combinations as a reminder that we cannot use these as networks.
What Addresses Will Identify the Hosts of ARI?
To answer this question we will pick one of the ARI networks at random and examine all the possible addresses that would be available on that particular wire.
192.16.12.144 represents one of the available wire addresses for ARI.
To determine the host addresses, we look at all the combinations of the host bits.
Table 2.6  Fourth Octet Host Combinations of the 192.16.12.144 Network
128
64
32
16
8
4
2
1
Combo 10
1
0
0
1
0
0
0
0
144
Wire Address
1
0
0
1
0
0
0
1
145
Host Address
1
0
0
1
0
0
1
0
146
Host Address
1
0
0
1
0
0
1
1
147
Host Address
1
0
0
1
0
1
0
0
148
Host Address
1
0
0
1
0
1
0
1
149
Host Address
Wire
1
0
0
1
0
1
1
0
150
Host Address
Address
1
0
0
1
0
1
1
1
151
Host Address
is
1
0
0
1
1
0
0
0
152
Host Address
144
1
0
0
1
1
0
0
1
153
Host Address
1
0
0
1
1
0
1
0
154
Host Address
1
0
0
1
1
0
1
1
155
Host Address
1
0
0
1
1
1
0
0
156
Host Address
1
0
0
1
1
1
0
1
157
Host Address
1
0
0
1
1
1
1
0
158
Host Address
1
0
0
1
1
1
1
1
159
Broadcast Addres
Remember, we have to deduct the all 1 (one) and the all 0 (zero) combinations.
  The all 0 combination describes the 192.16.12.144 wire.
  The all 1 combination describes the broadcast address for wire 192.16.12.144.
The address range of 145 through 158 can be used to describe hosts.
Each of the 14 networks can have a maximum of 14 hosts (24–2=14).
As a result, the total number of hosts that ARI can address with this single CLASS C address is 14x14=196.
At present, JAX requires 11 hosts addresses. If that office should grow, we would then have 3 addresses available.
The other sites require 6 addresses at this time. So we have 8 addresses that will not be used, but would be available in case of growth.
The serial connections are a different story. They require two addresses now, two addresses tomorrow, and two addresses forever. We will never be able to use the 12 “extra” addresses for each of those serial links, so they are wasted.
In later chapters we will look at classless routing protocols and VLSM as a solution to these wasted addresses.
What Addresses Will Be Identified as Broadcast Addresses?
A broadcast address is an address that addresses all hosts.
During a class several years ago, a student described the broadcast address as the address at the end of the wire. I think that is a wonderful description. If we use the example above, the address of 160 represents the next wire. The address of 159 is the last address on wire 144. 159 is the broadcast address for the 144 wire.
When all host bits are set to 1 the result is a broadcast address as shown in Table 2.5
Assume we have a Class C address and are using the 5 bit mask. If we examine the first available network (8) we know that there are 6 legal host addresses (2N–2). These addresses range from 9 to 14 and the next address of 15 is the broadcast address. The next address of 16 is the second available wire address. Hence the broadcast address for a given network is one less than the next available network.
Table 2.7  Broadcast Address of 15
128
64
32
16
8
4
2
1
Value
Network
0
0
0
0
1
0
0
0
8
Last Host
0
0
0
0
1
1
1
0
14
Broadcast
0
0
0
0
1
1
1
1
15
Next Wire
0
0
0
1
0
0
0
0
16
Applying the Address Scheme to ARI
Here is one possible addressing solution. Other solutions are possible.
192.16.12.128 wire address to describe the serial segment between JAX and SANFRAN
192.16.12.144 wire address to describe the serial segment between JAX and TAMPA
192.16.12.160 wire address to describe the serial segment between JAX and DALLAS
192.16.12.176 wire address to describe the Ethernet segment of JAX.
192.16.12.192 wire address to describe the Ethernet segment of SANFRAN.
192.16.12.208 wire address to describe the Ethernet segment of TAMPA.
192.16.12.224 wire address to describe the Ethernet segment of DALLAS.

 


 
Books24x7.com, Inc © 2000 –  Feedback